<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-model 修饰符</title>
</head>
<body>
    <script src='/js/vue.js'></script>
    <div id='app'>
        <!-- 1.lazy修饰符 回车才会获取数据 -->
        <input type="text" v-model.lazy="msg">
        <h2>{{msg}}</h2>

        <!-- 2.number修饰符 将数据类型转为数字 -->
        <input type="number" v-model.numver="age">
        <h2>{{age}}</h2>
        <!-- 3.trim修饰符 去除前后空格 -->
        <input type="text" v-model.trim="name">
        <h2>{{name}}</h2>


        <p>{{msg}}</p>
    </div>

    <script>
        let app = new Vue({
            el:'#app',
            data:{
                msg:'hello word',
                age:12,
                name:'',
            }
        })
    </script>
</body>
</html>